import config from '@/config';
import http from '@/utils/request';

export default {
	imageUrl: {
		url: `${config.API_URL}/canvas/pic`,
		name: '获取图片路径',
		get: function (procType, formula = '') {
			return `${this.url}?procType=${procType}&formula=${formula}`;
		},
	},
	config: {
		url: `${config.API_URL}/canvas/config`,
		name: '获取配置数据',
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	points: {
		url: `${config.API_URL}/canvas/points`,
		name: '获取指定配方的锚点数据',
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
};
